<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends PublicController {
    /*登录页  开发人：周弈男*/
    public function index(){
    	$this->display();
    }
    /*登陆  开发人：周弈男*/
    public function login(){
       session('flag',null);
       $admin=M('admin');
       $map = array();
       $map['nick'] = I('post.adminname');
       $map['pwd'] = md5(I('post.pwd'));

       $res=$admin->where($map)->select();
       if($res==null){
          $this->error('用户名密码错误');
       }else{
          session("flag","no");
          redirect(U("Club/clublist"));
       }
    }
}
